﻿//
// XN4SL - Xna Framework for Silverlight.
//
using Xn4Sl.Framework;
using System.Collections.Generic;

namespace Xn4Sl.Framework.Input
{
    /// <summary>
    /// Allows retrieval of keystrokes from a keyboard input device.
    /// </summary>
    public static class Keyboard
    {
        /// <summary>
        /// Current states of the keys.
        /// </summary>
        private static KeyboardState keyStates = new KeyboardState();

        /// <summary>
        /// Sets the current keyboard state.
        /// </summary>
        /// <param name="keys">Array or parameter list of Keys to initialize.</param>
        internal static void SetKeyState(Keys key, KeyState state)
        {
            keyStates.SetKeyState(key, state);
        }

        /// <summary>
        /// Returns the current keyboard state.
        /// </summary>
        /// <returns>Current keyboard state.</returns>
        public static KeyboardState GetState()
        {
            return keyStates;
        }

        /// <summary>
        /// Returns the current keyboard state for the specified player.
        /// </summary>
        /// <param name="playerIndex">Player index.</param>
        /// <returns></returns>
        public static KeyboardState GetState(PlayerIndex playerIndex)
        {
            return GetState();
        }
    }
}

